Expert system, system element and a method to be used in the system

ABSTRACT

A method is an incremental forward-chaining reasoning in a rule based system where data tuples and rules can be inserted and deleted in runtime. The method doesn&#39;t require storing or calculating a dependency tree in order to re-reason new implicit tuples. All tuples are associated with inference counter in order to provide an efficient delete operation for tuples without the need of re-calculating existing reasoning results.

FIELD

The embodied invention relates to semantic web in a very general level. More specifically it belongs to a field of expert systems, especially to runtime forward-chaining reasoning method utilization of data tuples as indicated in the preamble part of the an independent claim directed thereto. The invention relates also to a system that uses the method in the system and/or a system element, thereof. The invention relates also to use of such system elements. In other words, the embodiments of the invention are related to an expert system, a system element of knowledge representation system (KR) and semantic web system and methods for inferencing more data from explicitly given data using set of rules. Rule processing also share common characteristics with traditional formal description logic languages.

BACKGROUND

Semantic Web is considered as an extension of World Wide Web having information linked up such a way as to be easily processable by machines. The Semantic Web is generally built on syntaxes which use URIs to refer data, usually in triple based structures, like RDF. Information about the data, called as metadata, is something that benefits especially from reasoning. Inferred metadata often reduces human interaction required and can also help with interoperability issues faced when combining or utilizing different data sources at the same time.

In Semantic Web, rules about the data are often expressed as ontologies that describe the characteristics of the data by giving a shared vocabulary to express knowledge. Such ontology languages are for example Web Ontology Language (OWL) and RDF Schema (RDFS).

The delete operation is often seen as not being part of the Semantic Web systems, mostly because of the open world subsumption where everything is expected to be true unless stated otherwise. The subsumption makes deleting of a fact pointless, as the operation will not make the fact false. In real application use cases in most application domains, the delete operation can be seen as “undoing the insertion of the fact”. With this definition the delete operation must also “undo” the inference triggered by the inserted fact. This kind of behavior is needed for example, when correcting erroneous data or the data has changed during time.

An Expert System as Such

Expert System is considered as a computer program that uses symbolic knowledge and inference to reach conclusions (Mercadal, 1990, ss. 96-97). It derives most of its power from its knowledge. The key components of an expert system are an inference engine and a knowledge base. The separation of control (the inference engine) from knowledge (knowledge base) is a hallmark of an expert system. Other components of an expert system include a user interface, a knowledge-acquisition module, and an explanatory interface. Data tuples and horn clause rules as such are used in known expert systems.

Forward Chaining

The forward chaining inference is one of the two main methods of reasoning when using inference rules as such. The opposite of forward chaining is backward chaining. Forward chaining reasoning starts from the available tuples and the rules (the antecedent) and produces more data tuples (the consequent). Forward chaining suits well in reasoning systems where large number of data queries are made concurrently and query performance is important as all inferencing takes place together with data modification operations.

In forward chaining inference the most common strategy is to use total materialization where all implicit tuples are inferred into and from the tuple space during data modification operations.

One commonly used inference algorithm is Rete algorithm (Forgy, 1979) that provides a generalized logical description of an implementation of functionality responsible for matching data tuples against rules by creating and maintaining a network of nodes consisting of rules and facts. As it is suitable for relatively small datasets with highly computational rules, it scales poorly when the data size increases. Also the working memory requirements are high as the whole Rete network must be kept in memory for maximum performance.

Decision tree learning, used in statistics, data mining and machine learning, uses a decision tree as a predictive model which maps observations about an item to conclusions about the item's target value. In these tree structures, leaves represent class labels and branches represent conjunctions of features that lead to those class labels. Similarly in reasoning, the decision tree branches are combinations of implicit or explicit tuples with a rule that produce implicit tuples the leaf nodes present. Use of decision trees leads to a computational complexity that can lead into performance and scalability issues with larger data sets and with complex rules. Also memory requirements are high as the decision tree must be stored and kept accessible all the time.

Known Methods for Delete

The most common approach for implementing a delete operation in Semantic Web is to remove inferred tuples and re-infer all inferred tuples again. This approach may be valid in systems where data changes rarely and modifications to the data are mainly done in a batch operation, for example once a day. The time spent for re-inference can be lowered by partitioning the data and re-inferencing only the corresponding partitions, but it still may take a long time preventing read operations to occur simultaneously. For operational data that changes constantly this approach is intolerable as it requires exclusive write access to the tuple space and thus restricting concurrent queries and may take a long time to finish.

BRIEF SUMMARY OF EMBODIMENTS OF THE INVENTION

A Runtime forward-chaining reasoning method according to the invention is characterized in that what has been said in an independent claim directed to the runtime forward-chaining reasoning method.

A system according to the invention is configured to execute the method according to the invention is characterized in that what has been said in an independent claim directed to the system to execute the method according to the invention.

A system element of the system according to the invention is characterized in that what has been said in an independent claim directed to the system element.

Other embodiments of the invention are shown in the dependent claims and/or in the examples indicated in the text part accompanied by the relating Figs.

Embodiments of the invention are combinable in suitable part.

A Runtime forward-chaining reasoning method of data tuples and/or rules to be inserted and/or deleted according to an embodiment of the invention is comprising: keeping record of inference counters for each data tuple in order to provide delete operation that doesn't require re-calculation of tuples inferred earlier.

The method according to an embodiment of the invention comprises in the method re-running the method every time the set of explicit data tuples or rule set is changed.

The method according to an embodiment of the invention comprises in the method at least one of the following: insertion of a tuple, deletion of a tuple, insertion of a rule, deletion of a rule.

The method according to an embodiment of the invention comprises in the method that the said changes of said tuples and/or rules are arranged to be inputted so that they avoid re-inference of an existing implicit tuple.

The method according to an embodiment of the invention comprises in the method inferring all implicit tuples when an ensemble of all explicit data tuples and/or an ensemble of all explicit rules have/has been inserted into the system.

The method according to an embodiment of the invention comprises in the method making accessible at least one of the tuples of all explicit data tuples by using the terms of tuple pattern search.

The method according to an embodiment of the invention comprises in the method that a sub-ensemble of all implicit or explicit data tuples is loaded into the working memory used by the system.

The method according to an embodiment of the invention comprises in the method at least one of the following:

-   -   evaluating sequentially at least one rule of the rules in the         system,     -   inserting resulting implicit tuples,'     -   deleting resulting implicit tuples and     -   updating inference counters.

The method according to an embodiment of the invention comprises in the method a variable substitution for tuple pattern searches to search relevant tuples for any of the operations of an embodiment.

The method according to an embodiment of the invention comprises in the method a selection of the appropriate existing rules to be evaluated.

The method according to an embodiment of the invention comprises in the method identifying a number of loops and/or repeating the evaluation until the system will not change anymore.

The method according to an embodiment of the invention comprises in the method stopping recursion of a tuple as a response to an initiative of observation of having the same explicit tuple and rule combination being processed already.

The method according to an embodiment of the invention comprises in the method distributing at least one method step into a another processing node than the executing node before said distributing.

The method according to an embodiment of the invention comprises in the method providing said another node with individual working memory, shared access to a rule set and/or right to execute a tuple pattern search against shared tuple data.

A system according to an embodiment of the invention is configured to execute the method according to an embodiment of the invention.

A system element according to an embodiment of the invention in an embodied system is comprising executing means to perform a method step of a previous method claim.

A codec or a decoder according to an embodiment of the invention is comprising means of an embodied system element according to an embodiment of the invention.

A codec or a decoder according to an embodiment of the invention that is comprising a data base module to access to a data base of rules, tuples and/or configuration data.

An inference engine according to an embodiment of the invention is configured to execute a method according to an embodiment of the invention.

An expert system according to an embodiment of the invention is comprising a system element according to an embodiment, wherein the system comprises at least one element of the following:

-   -   User interface,     -   A knowledge-base,     -   A knowledge acquisition module and     -   An Explanatory interface.

The expert system according to an embodiment of the invention comprises in at least one of the system elements an embodied element.

A software product according to an embodiment of the invention comprises software means that are configured to load a computer code into a memory of a computer to be executed in a processor connected to said memory a computer code arranged to execute an embodied method.

The embodiments of the invention are free from certain restrictions and thus not restricted to a particular language, so supporting also other formal semantics than description logic (DL). The method of the invention uses monotonic logic to infer new knowledge using data tuples and horn clause rules.

The method embodied by the invention doesn't need Rete networks or decision trees to operate at all. Decision trees are shown in the examples to demonstrate the inference counters used by the method embodied but they are not used by the actual method in any way.

Data Tuples

In the embodied method variants, the data consists of ordered list of elements whose structure as such is known, e.g. the data tuples (Guth, 1998 as such). The data is a tuple space as an associative memory accessible by the in the embodied method. In an embodied method, in semantic web the tuples have often at least three elements: a subject, a predicate and an object. A skilled person in the art knows that the number of elements is exemplary and thus the number of elements is not limited only to the exemplified three. In the embodied method, Semantic web tuple space can be expressed as a graph where each subject and object are nodes and predicates are directed links between the subject node and the object node.

A method according to an invention is an incremental forward chaining reasoning in a rule based system where data tuples and rules can be inserted and deleted in runtime. The embodied method doesn't require storing or calculating a dependency tree in order to reason new implicit tuples. All tuples are associated with inference counter in order to provide an efficient delete operation for tuples without the need of re-calculating existing reasoning results. Thus, the dependency tree for reasoning for new tuples can be omitted to use less memory and computing capacity thus saved, in addition to which the subsequent data modification operations do not require updating the dependency tree.

As a side effect from this is that the pruning of the above mentioned tree is not needed neither, as the whole tree treatment can be omitted and even more computing capacity is saved as well as time.

Services and applications that need to constantly execute data requests and data modification operations as such in the known techniques, like OLTP and data routing systems, benefit from the incremental nature of the method embodied by the invention, because it allows shorter response times as re-calculation of implicit tuples or modifications of the inference dependency tree are not required.

An application area that greatly benefits real-time reasoning and reduced computational complexity is news routing into subscribed customers. Routing news often involves complex rules to be evaluated in order to decide which customers are interested in receiving the particular piece of news. Also news routing and delivery is concurrent by nature, processing large amount of incoming news constantly that makes long computation pauses and nightly preprocessing intolerable.

According to an embodiment of the invention a system element is configured to implement the method according to an embodiment of the invention. According to an embodiment of the invention the system element is a news system element. According to an embodiment of the invention a news server is implemented within a system according to an embodiment of the invention.

Saving computing capacity, memory and/or time is advantageous in general, especially in portable devices and embedded systems, where processing power is limited due to power consumption and size limitations.

The method according to an embodiment of the invention uses tuple pattern searches to access the existing fact/inferred data tuples that makes it possible to use external memory, like hard disk, to store data tuples. It also makes possible to use index data structures to efficiently evaluate the pattern match queries.

LIST OF FIGURES

In the following, a reference is made to the figures and the symbols therein to explain embodiments of the invention via the so indicated examples on the embodiments. Same reference numerals do not denote necessarily to identical object in another figure, but a skilled man in the art can deduce the potential difference if any from the shown context.

FIG. 1 illustrates interference counter and tuples according to an embodiment of the invention,

FIG. 2-3 illustrate how tuple changes change an imaginary dependency tree for an embodiment of the invention,

FIG. 4-5 illustrate how tuple changes change imaginary dependency tree for an embodiment.

DETAILED DESCRIPTION OF AN ENSEMBLE OF EMBODIMENTS OF THE INVENTION

The rules are horn logic clauses (Horn, 1951) that can be expressed as an implication formula:

(p₀

p ₁

. . .

p _(n))→p ₀

For simplicity reasons, the embodied method allows more than one positive literal in the disjunction because it can be easily seen that as such horn clauses having identical negative elements p but different positive element p′ can be combined into an implication formula:

(p ₀

p ₁

. . .

p _(n))→(p ₀ ′

p ₁ ′

. . .

p _(m)′)

The method according to an embodiment of the invention works per tuple basis, e.g. in an embodiment, each applicable rule is evaluated for every data tuple inserted or deleted. The method will continue to process new operations until, based on the inference counters, no new reasoning is required.

Tuples are unique in the tuple space and therefore identical tuples cannot be present in the same space. Distinction between explicit tuples (i.e. facts) and implicit tuples (i.e. inferred tuples) is important in certain cases, for example in the delete operation: an implicit tuple cannot be explicitly deleted from the space as it would make the tuple space inconsistent with the current rules. However, the method embodied by the invention doesn't restrict on explicitly adding a tuple that is already inferred, or will be inferred, causing the same tuple to occur as an implicit and an explicit tuple at the same time. Also deletion of a rule or an explicit tuple may cause implicit tuples to be deleted if and only if they are not inferred by some other rules and tuples still in the space. Therefore explicit tuples and implicit tuples are considered embodied by this method as distinct tuples, notated as A^(F) (fact tuple A) and A^(I) (inferred tuple A), even if they are in context of the tuple space representing exactly the same tuple A.

Rules

An advantage of embodiments of the invention is that rules can be added to the system, and especially also removed when needed so that a re-deduction is not necessarily needed at all.

The rules in the embodied method are horn logic clauses that can be expressed as an implication formula:

R:(L ₀

L ₁

. . .

L _(n))→(L ₀ ′

L ₁ ′

. . .

L _(m)′), where

L _(k)=(v ₀ , . . . , v _(i)),v=(variable|constant)

Literals in the rules must be of same length as the tuples in the tuple space. Rules for a tuple space with tuples length of three must have literals that have also length of three. For example:

L ₁=(?x:knows?y)

In the example above, the literal L₁ has two variables (marked with ?-prefix) and a constant value “knows” (marked with :−prefix). A constant can be any value of any form depending on the application area and value space used for the values of tuples. Textual constants like predicate “:knows” are presented without intention to limit the scope of related embodiments. Let data tuple F and rule R be:

F=(t ₀ , . . . ,t _(i))

R:(L ₀

L ₁

. . .

L _(n))→L′

According to an embodiment of the invention the rule R is considered as applicable for a tuple F if and only if:

∃xε{0,n}:L _(x)=(v ₀ , . . . ,v _(i)), where

∀i:v _(i) is a constant

v_(i) =t _(i)

Variable Substitution

Method according to an embodiment of the invention uses a rule rewrite based on tuples inserted and removed. In an embodiment of the invention an ensemble of literals comprising at variables of at least one literal are substituted with the values from the actual tuple and results are calculated based on all variations of the rewritten rules.

A rule rewriter is a subsystem that executes the variable substituting. Substituting a rule R with values from fact F

R:(L ₁

L ₁

. . .

L _(n))→L ₀′

produces the following rule applications R¹′ . . . R^(n)′:

${R^{1\prime}:\begin{pmatrix} F & \Lambda & L_{2}^{\prime} & \Lambda & \ldots & \Lambda_{n}^{\prime} \end{pmatrix}}->L_{0}^{\prime}$ … ${R^{n\; \prime}:\begin{pmatrix} L_{1}^{n\; \prime} & \Lambda & L_{1}^{n\; \prime} & \Lambda & \ldots & \Lambda & L_{n - 1}^{n\; \prime} & \Lambda & F \end{pmatrix}}->L_{0}^{n\; \prime}$

where one of the negative literals L_(i) is replaced with the fact F and all variables occurring in L_(i) are substituted from other literals (negative and positive) with the values from tuple F:

L _(i)=(v ₀ ^(i) , . . . , v _(j) ^(i))

k≠i:L _(k)′=(v ₀ ^(k) , . . . ,t _(m) , . . . , v _(j) ^(k)), where v_(m) ^(k) =v _(m) ^(i)

For example, a rule R₁ contains two literals L₁ and L₂ as antequents and a L₃′ as a consequent:

R₁ = (?x:childOf?y)Λ(?x:childOf?x)− > (?x:grandParent?z) ⇔ R₁ = L₁Λ L₂− > L₃^(′)

Together with fact

F ₁=(:p1:childOf :p2)

rule R₁ will produce the following rewritten rule applications R₁ ¹′ and R₁ ²′:

-   -   1) Substitute variables in literal L₁ using values from fact F₁:

R ₁ ¹′=(:p1:childOf:p2)

(:p2:childOf?z)→(:p1:grandParent?z)

-   -   2) Substitute variables in literal L₂ using values from fact F₁:

R ₁ ²′=(?x:childOf:p1)

(:p1:childOf:p2)→(?x:grandParent:p2)

In an embodiment of the invention, these rewritten rules R₁ ¹′ and R₁ ²′ are evaluated against the tuple space to get a table of variable bindings. Implicit tuples are constructed using the variable bindings and the right side of the rewritten rule application.

Let execution of left side of R₁ ¹′ return the following variable bindings:

$\frac{?z}{\begin{matrix} {:{p\; 3}} \\ {:{p\; 4}} \end{matrix}}$

Using these bindings the following implicit tuples can be constructed from the right side of the implication in R₁ ¹′:

I ₁=(:p1:grandParent:p3)

I₂=(:p1:grandParent:p4)

As a result of the method embodied by the invention implicit tuples I₁ and I₂ are considered as under consideration for insert, delete or updating inference counters depending on the operation at hand.

Some of the rewritten rule applications can be left out immediately in an embodiment of the method, if they do are not compatible with the rule.

R ₂=(?x:knows?y)(?y:knows?x

For example rule R₂ has no tuple patterns that would match for the tuple F₇ making rule R₂ unnecessary to be executed when inserting or deleting tuple

Inference Counters

In an embodiment of the invention, the reasoning can result same tuples from different rules and different fact tuples. Inferred tuple can also be inserted as a fact too, in an embodiment of the invention. These characteristics apply using counters to keep record which inferenced tuples can be removed and which isn't.

An inference subsystem is a part of the system that evaluates inference, modifies the tuple space and maintains inference counters.

For every inferred tuple the inference counter c>=1 indicates the number of rewritten rule applications that produce the inferred tuple. For inferred tuple A^(I) with inference counter c=n, there is exactly n distinct rule applications R′ that produce A^(I) when executed.

When represented as an inference tree, the counter can be seen as the number of incoming reasoning arrows to the inferenced node:

An example of tuple I₀ with inference counter c=2 (two incoming arrows) is indicated in FIG. 1.

Comparing the inference counters as embodied by the invention together with the inference tree commonly used with reasoning, two significant characteristics should be noted: 1) during insert or delete operation the actual tuple space is edited only if the existence of the tuple changes and 2) inference counters of implicit triples far lower in the dependency tree (if one such would be used) do not need to be changed if the counters upper in the dependency tree changes. With complex rules and rules that tend to produce same output, like inferencing an instance type based on property values, do not require more computation or modifications in situations where dependency tree would be very complex and the length of the sub-tree large.

Insert Operation

The inference subsystem is responsible for tuple and rule insertion operations.

Insertion of an explicit tuple or a rule embodied by the invention contains at least one of the following operations:

1. assertion that the tuple is not already present in the tuple space as a fact,

2. assertion that the rule is not already present in the system,

3. if the tuple is already present as an implicit tuple, mark it as an explicit tuple,

4. if the tuple is not present in the tuple space, add it and execute inference embodied by the method for the tuple,

5. if rule is not present in the system, add rule into the system,

6. if rule is not present in the system, execute the literals of left side of the rule without any variable substitution, construct tuples based on results and the right side of the rule and add them as new implicit tuples.

For every the implicit tuple inferred by the method one of the following operations takes place:

1. If the tuple is already present, increase the inference counter of the tuple,

2. If the tuple is not already present, insert it into the tuple space, set inference counter to 1 and execute inference as embodied by the method.

Let us consider the following example where reasoning is presented as a tree in accordance of the embodied method, by referring to the (FIG. 2 and FIG. 3). In an embodiment according to the method, it infers tuple B from rule R1 and fact A and tuple D from tuple B and rule R2. Inference counter is c=1 for both inferenced tuples B and D (as there is only one arrow pointing to the node when represented as a dependency tree).

An imaginary dependency tree after insert of a tuple A, explicit tuples B and D inferred and their inference counters is indicated to illustrate an example via FIG. 2.

An imaginary dependency tree after inserting explicit tuple C, inserted implicit tuple A and updated inference counter of implicit tuple B is indicated to illustrate an example via FIG. 3.

Let us insert a fact C together with a rule R3 (FIG. 3):

According to an embodiment of the invention the tuple A is inferred from C and now tuple A is at the same time a fact and also an inferred tuple. Inserting inferred tuple A causes counter of B to be increased. This will not trigger any new inference to be run and also inference counter of tuple D will not be increased as the tuple B is already present in the tuple space as an inferred tuple.

An example is given how to insert a tuple T according to an embodiment of the invention. In the example, also a rule insertion is indicated in the pseudo code notation.

According to an embodiment of the invention the Implementation tracks the path from deleted explicit tuple to the end of the chain to make sure same tuple is not processed multiple times.

Inserting tuple T: insert(T):  insert(T, emptyList) insert(T, previousTuples):  if T is not a fact:   if previousTuples contains T:    return   ++counterFor(T)  if repository contains T:   return  insert T into repository  for each rule R:   if rule R has no compatible antequent triple patterns with T:    break   for each unique rewritten rule application R′ of R(T):    S = execute(R′)    for each tuple T2 in S:     add T2 into previousTuples     insert(T2, previousTuples)     remove T2 from previousTuples Inserting rule R: insert(R):  if repository contains R:   return  S = execute(R)  for each tuple T in S:   insert(T)  insert rule R

Delete Operation

The inference subsystem is responsible for tuple and rule deletion operations.

Deletion of an explicit tuple or a rule embodied by the invention contains at least one of the following operations:

-   -   1. assertion that the tuple is present in the tuple space as a         fact,     -   2. assertion that the rule is present in the system,     -   3. if the tuple is present in the tuple space as an implicit         tuple, remove explicit tuple mark for it and execute inference         embodied by the method for the tuple,     -   4. if the tuple is present in the tuple space as a fact and not         as an implicit tuple, remove the tuple from tuple space and         execute inference embodied by the method for the tuple,     -   5. if the rule is present in the system, remove rule from the         system,     -   6. if the rule is present in the system, execute the literals of         left side of the rule without any variable substitution,         construct tuples based on results and the right side of the rule         and remove them as implicit tuples.

For every implicit tuple inferred by the method at least one of the following operations takes place:

-   -   1. If the tuple is present, decrease the inference counter of         the tuple     -   2. If the inference counter of the tuple is (after decrement)         zero (c=0), execute inference as embodied by the method,     -   3. If the tuple is not present as an explicit tuple and         inference counter of the tuple is (after decrement) zero (c=0),         remove tuple from the tuple space

As an example let us consider a deletion of a fact tuple A from the tuple space shown in the FIG. 2 as a imaginary dependency three. As in the embodiment of the invention the fact status of tuple A will be removed but its still inferred from tuple C. Removing the fact A (step 1) causes inference to occur (step 2), and as a result counter of B to be decreased (step 3). Counter of D will not be changed as B will not be removed (c is still positive).

An imaginary dependency tree after deleting explicit tuple A and updated inference counter of implicit tuple B is indicated to illustrate an example via FIG. 4.

And let us finally delete fact tuple C (FIG. 5). As embodied by the invention, the deletion of C (step 1) will cause deletion of an inferred tuple A (step 2) as inference counter of A hits 0. Deletion of inferred tuple A will also cause deletion of B (step 3) and finally deletion of D (step 4).

An imaginary dependency tree after deletion of fact tuple C and deletion of inferred tuples A, B and D is indicated to illustrate an example via FIG. 5.

According to an embodiment of the invention the Implementation must track the path from deleted explicit tuple to the end of the chain to make sure same tuple is not processed multiple times.

Deleting tuple T: delete(T):  delete(T, emptyList) delete(T, previousTuples):  if repository doesn't contain T:   return  if T is not a fact:   if previousTuples contains T:    return   if −−counterFor(T) > 0:    return  for each rule R:   if rule R has no compatible antequent triple patterns with T:    break  for each unique rewritten rule application R′ of R(T):   S = execute(R′)   for each tuple T2 in S:    add T2 into previousTuples    delete(T2, previousTuples)    delete T2 from previousTuples  delete T from repository Deleting rule R: insert(R):  if repository doesn't contain R:   break  S = execute(R)  for each tuple T in S:   delete(T)  remove rule R

Method embodied by the invention can be realized by a device that is capable of automatically routing information, like news, to other nodes in the network by using complex and general routing rules.

A coding system comprises a codec/decoder according to an embodiment of the invention. The codec of the coding system comprises coding means that are arranges to form a tuple space of set of incoming information. The codec also comprises coding means for rules additions and deletions received by the device.

According to an embodiment of the invention the device infers routing information using the rule set in the device, the tuple space in the device and the encoded information as tuples. The routing information is used to determine which nodes in the network are subscribed for this kind of information. The device decodes the information from the tuple space and transmits it into the corresponding nodes in the network.

LIST OF ABBREVIATIONS AND SYMBOLS

Symbol/ abbreviation Definition p_(n) n:th literal in an implication formula p_(n)′ n:th negative literal in an implication formula. Negative literals exist by definition in the right side of the implication formula R a rule expressed as a horn logic clause visualized an implication formula R_(n) n:th rule L literal of a rule L_(n) n:th positive literal in the rule. Positive literals construct the left side of the rule L_(n)′ n:th negative literal in the rule. Negative literals construct the right side of the rule L′ abbreviation for all negative literals L₀′ . . . L_(n)′ in the rule v_(n) n:th variable or constant in a literal L that represents a tuple pattern v_(n) ^(k) n:th variable or constant in a literal L_(k) ? x tuple pattern variable “x” that can be part of a literal L : value tuple pattern constant “value” that can be part of a literal L. Constant can be of any textual or non-textual value depending on the value space used for the tuple space F tuple that is explicitly inserted into the tuple space, e.g. an explicit tuple F_(n) n:th explicit tuple I tuple that is implicitly inferred into the tuple space, e.g. an implicit tuple I_(n) n:th implicit tuple t_(n) n:th value in a tuple A^(F) tuple A that is an explicit tuple A^(l) tuple A that is an implicit tuple R_(n) ^(k)′ k:th rule application of rule R_(n) that has all variables occurring in n:th literal substituted with values R_(n)′ a rule application or rule applications of rule R_(n) R′ a rule application or rule applications of rule R c inference counter for an implicit tuple

BIBLIOGRAPHY

-   Forgy, C. (1979). On the efficient implementation of production     systems. Ph.D. Thesis, Carnegie-Mellon University. -   Guth, R. (1998, August). More than just another pretty name: Sun's     Jini opens up a new world of distributed computer systems. Sun     World. -   Horn, A. (1951). On sentences which are true of direct unions of     algebras. Journal of Symbolic Logic, 16, 14-21. -   Mercadal, D. (1990). Dictionary of artificial intelligence. New     York, N.Y: Van Nostrand Reinhold. 

1. A Runtime forward-chaining reasoning method of data tuples and/or rules to be inserted and/or deleted, comprising: keeping record of inference counters for each data tuple in order to provide delete operation that doesn't require re-calculation of tuples inferred earlier.
 2. The method of claim 1 wherein the method comprises re-running the method every time the set of explicit data tuples or rule set is changed.
 3. The method of claim 1 wherein the method comprises at least one of the following: insertion of a tuple, deletion of a tuple, insertion of a rule, deletion of a rule,
 4. The method of claim 1 wherein the said changes of said tuples and/or rules are arranged to be inputted so that they avoid re-inference of an existing implicit tuple.
 5. The method of claim 4 wherein the method comprises inferring all implicit tuples when an ensemble of all explicit data tuples and/or an ensemble of all explicit rules have/has been inserted into the system.
 6. The method of claim 1, wherein the method comprises making accessible at least one of the tuples of all explicit data tuples by using the terms of tuple pattern search.
 7. The method of claim 6 wherein a sub-ensemble of all implicit or explicit data tuples is loaded into the working memory used by the system.
 8. The method of claim 1, wherein method comprises at least one of the following: evaluating sequentially at least one rule of the rules in the system, inserting resulting implicit tuples,' deleting resulting implicit tuples and updating inference counters.
 9. The method of claim 8, wherein the method comprises variable substitution for tuple pattern searches to search relevant tuples for any of the operations.
 10. The method of claim 1, wherein the method comprises selection of the appropriate existing rules to be evaluated.
 11. The method of claim 10, wherein the method comprises identifying a number of loops and/or repeating the evaluation until the system will not change anymore.
 12. The method of claim 8, wherein the method comprises stopping recursion of a tuple as a response to an initiative of observation of having the same explicit tuple and rule combination being processed already.
 13. The method according to claim 1, wherein the method comprises distributing at least one method step into another processing node than the executing node before said distributing.
 14. The method of claim 13, wherein the method comprises providing said another node with individual working memory, shared access to a rule set and/or right to execute a tuple pattern search against shared tuple data.
 15. A system configured to execute the method according to claim
 1. 16. A system element of the system of claim 15, comprising executing means to perform a method step of a previous method claim.
 17. A codec or a decoder comprising means of said system element of claim
 16. 18. A codec or a decoder of claim 17 comprising a data base module to access to a data base of rules, tuples and/or configuration data.
 19. An inference engine, configured to execute a method according to claim
 1. 20. An expert system comprising a system element of claim 16, wherein the system comprises at least one of the following: User interface, A knowledge-base, A knowledge acquisition module and An explanatory interface.
 21. A software product comprising software means that are configured to load a computer code into a memory of a computer to be executed in a processor connected to said memory a computer code arranged to execute an embodied method. 